package com.reggie.common.enums.front;

import com.reggie.common.ResultResponseVo;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author 早睡蛋
 * @Date 2022/9/27 19:30:34
 * @Desc:
 */
@Getter
@AllArgsConstructor
public enum OrdersEnum {

    SUCCESS(200,"ok"),
    FAIL(400,"fail"),

    ADDRESS_NULL(400,"地址信息为空"),

    PAY_OK(200,"下单成功"),
    PAY_FAIL(400,"下单失败"),




    ;


    OrdersEnum(int code, String message) {
        this.resultResponseVo =  ResultResponseVo.defaultResultResponse();
        resultResponseVo.setCode(code);
        resultResponseVo.setMessage(message);
    }

    public int getCode(){
        return resultResponseVo.getCode();
    }

    public String getMessage(){
        return resultResponseVo.getMessage();
    }

    public ResultResponseVo getResult() {
        return resultResponseVo;
    }


    private final ResultResponseVo resultResponseVo;


}
